home *** CD-ROM | disk | FTP | other *** search
- par <- ParallelDevice new: 2r00101000 "PARF_SHARED | PARF_FASTMODE"
-
- "This test file requires that you actually monitor the Parallel port's"
- "pins with an oscilloscope, since it does some wild things that no"
- "self-respecting printer will tolerate!"
-
- " The returned status has the following meaning:"
-
- " BIT: ACTIVE: FUNCTION:"
-
- " 0 HIGH Printer Busy toggle (offline)."
- " 1 HIGH Paper out."
- " 2 HIGH Printer Select."
- " 3 ---- Read = 0, Write = 1"
- " 4-7 ---- Reserved."
-
- ('Status is ', (par status) asString) print
-
- "Monitor (with a scope or test instrument) the ctrl bits for fluctuation:"
-
- 'Toggling parallel control bits...' print
-
- par testToggleCtrlBits: 500 "Loop for around 35 seconds."
-
- bits <- par readControlBitsMaskedBy: 16r07
-
- ('The control bits are: ', (bits asString)) print
-
- ('Status is ', (par status) asString) print
-
- "Monitor (with a scope or test instrument) the data bits for fluctuation:"
-
- 'Toggling parallel data bits...' print
-
- par testToggleDataBits: 500 "Loop for around 35 seconds."
-
- ('Last status is ', (par status) asString) print
-
- par stopPort
- par flushPort
- par resetPort
- par close
-
- 'Now, hook up a printer to the Parallel port & run TestParallel2' print
-